package cn.qf.shop.service.impl;

import cn.qf.shop.mapper.OwnerMapper;
import cn.qf.shop.pojo.entity.Owner;
import cn.qf.shop.pojo.qo.OwnerQo;
import cn.qf.shop.service.PersonnelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 业主信息管理，人员管理的实现层
 */
@Service
public class PersonnelServiceImpl implements PersonnelService {
    @Autowired
    private OwnerMapper ownerMapper;
    @Override
    public List<Owner> selectAll() {

        List<Owner> owners = ownerMapper.selectAll();
        return owners;
    }


    @Override
    public List<Owner> selectByKeyWord(OwnerQo ownerQo) {
        List<Owner> owners = ownerMapper.selectByKeyWord(ownerQo);
        return owners;
    }

   @Override
    public int updateByOwnerIds(List<Integer> ownerIds) {
        int i = ownerMapper.updateByOwnerIds(ownerIds);
        return i;
    }

    @Override
    public int AddOwner(OwnerQo ownerQo) {
        int i = ownerMapper.AddOwner(ownerQo);
        return i;
    }

    @Override
    public int updateByOnclick(OwnerQo ownerQo) {
        int i = ownerMapper.updateByOnclick(ownerQo);
        return i;
    }

    @Override
    public int updateByOwnerId(OwnerQo ownerQoId) {
        int i = ownerMapper.updateByOwnerId(ownerQoId);
        return i;
    }
}
